<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

// 应用行为扩展定义文件
return [
    // 应用初始化
    'app_init'     => [],
    // 应用调度开始
    'app_dispatch' => [
        'app\\common\\behavior\\Config', // 注册配置行为
    ],
    // 应用开始
    'app_begin'    => [
        'app\\common\\behavior\\Hook', // 注册钩子行为
    ],
    // 模块初始化
    'module_init'  => [],
    // 操作开始执行
    'action_begin' => [],
    // 视图内容过滤
    'view_filter'  => [],
    // 日志写入
    'log_write'    => [],
    // 应用结束
    'app_end'      => [],
	
	/*****************user******************/
    //手机登录前置
    'login_mobile_before'      => [
        'app\\user_center\\behavior\\user\\login_mobile_before\\checkMobileCode', // 手机验证码校验
        'app\\user_center\\behavior\\user\\login_mobile_before\\checkFirstLogic', // 首次登录
    ],

    'login_mobile_balance_before'      => [
        'app\\user_center\\behavior\\user\\login_mobile_balance_before\\checkFirstLogic', // 首次登录
    ],

    //手机登录后置
    'login_mobile_after'      => [
		'app\\user_center\\behavior\\user\\login_mobile_after\\updateLoginInfo', // 更新登录状态
    ],


    //一键手机登录前置
    'login_mobile_oneclick_before'      => [
        'app\\user_center\\behavior\\user\\login_mobile_oneclick_before\\checkMobileCode', // code校验
        'app\\user_center\\behavior\\user\\login_mobile_oneclick_before\\checkFirstLogic', // 首次登录
    ],
    //一键手机登录后置
    'login_mobile_oneclick_after'      => [
        'app\\user_center\\behavior\\user\\login_mobile_oneclick_after\\updateLoginInfo', // 更新登录状态
    ],
	
	//微信登录前置
    'register_wechat_before'      => [
//        'app\\user_center\\behavior\\user\\register_wechat_before\\checkFirstLogic', // 微信登录校验
    ],
    //微信登陆登录后置
    'register_wechat_after'      => [
//        'app\\user_center\\behavior\\user\\register_wechat_after\\updateLoginInfo', // 更新登陆时间/ip/登录次数等
    ],
	
	//苹果用户登录前置
    'register_apple_before'      => [
//        'app\\user_center\\behavior\\user\\register_apple_before\\checkFirstLogic', // 微信登录校验
    ],
    //苹果用户登录后置
    'register_apple_after'      => [
//        'app\\user_center\\behavior\\user\\register_apple_after\\updateLoginInfo', // 更新登陆时间/ip/登录次数等
    ],

    //绑定手机号码前置
    'bind_mobile_before'      => [
        'app\\user_center\\behavior\\user\\bind_mobile_before\\checkMobileCode', // 手机验证码校验
        'app\\user_center\\behavior\\user\\bind_mobile_before\\checkMobileBind', // 检测是否绑定过其他账号
    ],
    //绑定手机号码后置
    'bind_mobile_after'      => [
        'app\\user_center\\behavior\\user\\login_mobile_after\\updateLoginInfo', // 更新登录状态
    ],
	
	//短信验证码前置
    'sms_sending_before'      => [
        'app\\user_center\\behavior\\user\\sms_sending_before\\checkSendTimes', // 发送短信验证
		'app\\user_center\\behavior\\user\\sms_sending_before\\checkMobileBind', 		// 检测是否绑定过其他账号(type=4更换手机号码)
    ],
    //短信验证码后置
    'sms_sending_after'      => [
        
    ],
	//刷新token前置
    'refresh_token_before'      => [
        'app\\user_center\\behavior\\user\\refresh_token_before\\checkRefreshtoken', // 检验有效性
    ],
    //刷新token后置
    'refresh_token_after'      => [
        
    ],
	//关注前置
    'focus_user_before'      => [
        'app\\user_center\\behavior\\user\\focus_user_before\\checkFocusLogic', // 检测是否关注
    ],
	//关注后置
    'focus_user_after'      => [
        'app\\user_center\\behavior\\user\\focus_user_after\\sendMessage', // 关注后 极光发送消息
    ],

	
	//变更旧手机号码前置
	'change_old_mobile_before'      => [
		'app\\user_center\\behavior\\user\\change_old_mobile_before\\checkMobileCode', // 手机验证码校验
    ],
	//变更旧手机号码后置
	'change_old_mobile_after'      => [
    ],
	//变更新手机号码前置
	'change_new_mobile_before'      => [
		'app\\user_center\\behavior\\user\\change_new_mobile_before\\checkMobileCode', // 手机验证码校验
		'app\\user_center\\behavior\\user\\change_new_mobile_before\\checkMobileToken', // 手机校验token
    ],
	//变更新手机号码后置
	'change_new_mobile_after'      => [
    ],
	//头衔认证前置
	'add_titlecertification_before'      => [
		'app\\user_center\\behavior\\user\\add_titlecertification_before\\checkMobileCode', // 手机验证码校验
    ],
	
	
	//绑定微信码前置
	'bind_wechat_before'      => [
        'app\\user_center\\behavior\\user\\bind_wechat_before\\checkWechatBind', //检测微信是否绑定过
    ],
	
	//绑定微信后置
	'bind_wechat_after'      => [
    ],
	//解除绑定微信码前置
	'unbind_wechat_before'      => [
        'app\\user_center\\behavior\\user\\unbind_wechat_before\\checkWechatBind', //检测微信是否绑定过
    ],
	//解除绑定微信后置
	'unbind_wechat_after'      => [
    ],
	
	//绑定苹果账号前置
	'bind_apple_before'      => [
        'app\\user_center\\behavior\\user\\bind_apple_before\\checkAppleBind', //检测微信是否绑定过
    ],
	//解除绑定苹果账号前置
	'unbind_apple_before'      => [
        'app\\user_center\\behavior\\user\\unbind_apple_before\\checkAppleBind', //检测微信是否绑定过
    ],
	
	//更新头像前置
	'avatar_upload_before'      => [
    ],
	//更新头像后置
	'avatar_upload_after'      => [
    ],
	
	//更新用户前置
	'edit_profile_before'      => [
		 'app\\user_center\\behavior\\user\\edit_profile_before\\checkNickName', //检测昵称是否重复
    ],
	//更新用户信息后置
	'edit_profile_after'      => [
    ],
	//退出登录前置
	'login_out_before'      => [
    ],
	//退出登录后置
	'login_out_after'      => [
    ],
	//我的粉丝列表前置
	'fans_list_before'      => [
        'app\\user_center\\behavior\\user\\fans_list_before\\checkPrivacy', //隐私设置 校验
    ],
	//我的粉丝列表后置
	'fans_list_after'      => [
    ],
	//我的关注列表前置
	'follow_list_before'      => [
        'app\\user_center\\behavior\\user\\follow_list_before\\checkPrivacy', //隐私设置 校验
    ],
	//我的关注列表后置
	'follow_list_after'      => [
    ],
	
	//用户拉黑
	'add_user_black_before'  => [
		'app\\user_center\\behavior\\user\\add_user_black_before\\checkBlackByUid', // 是否拉黑
    ],
	//取消拉黑
	'cancel_user_black_before' => [
		'app\\user_center\\behavior\\user\\cancel_user_black_before\\checkBlackByUid', // 是否拉黑
    ],

    //申请团长
    'apply_team_leader_before' => [
        'app\\user_center\\behavior\\user\\apply_team_leader_before\\ApplyOrNot', // 是否申请
    ],
    //申请供应商
    'apply_supplier_before' => [
        'app\\user_center\\behavior\\user\\apply_supplier_before\\ApplyOrNot', // 是否申请
    ],
	
	
	
	//Mcn - 艺人列表前置
	'artist_list_before'      => [
    ],
	//Mcn - 艺人列表后置
	'artist_list_after'      => [
    ],
	//Mcn - 添加艺人前置
	'add_artist_before'      => [
        'app\\user_center\\behavior\\mcn\\add_artist_before\\checkUserByMobile', //检测用户是否可用
    ],
	//Mcn - 添加艺人后置
	'add_artist_after'      => [
    ],
	//Mcn - 编辑艺人前置
	'edit_artist_before'      => [
    ],
	//Mcn - 编辑艺人后置
	'edit_artist_after'      => [
    ],
	//Mcn - 删除艺人前置
	'delete_artist_before'      => [
    ],
	//Mcn - 删除艺人后置
	'delete_artist_after'      => [
    ],
	//Mcn - 艺人详情前置
	'get_artist_info_before'      => [
    ],
	//Mcn - 艺人详情后置
	'get_artist_info_after'      => [
    ],
    /*****************user******************/


    /*****************video******************/
    //点赞前
    'add_support_before'      => [
        'app\\video\\behavior\\add_support_before\\checkSupport', // 用户是否点过赞
    ],
    //点赞后
    'add_support_after'      => [
        'app\\video\\behavior\\add_support_after\\sendMessage', // 极光发送消息
    ],
    //视频上传成功 后置
    'file_upload_complete_after'      => [
        'app\\video\\behavior\\file_upload_complete_after\\submitAIMediaAuditJob', // 是否自动 智能审核
    ],
    //视频 人工审核 后置
    'create_audit_complete_after'      => [
        'app\\video\\behavior\\create_audit_complete_after\\updataPlayStatus', // 更新 视频 表状态
        'app\\video\\behavior\\create_audit_complete_after\\updataAuthorWorkTimes', // 作品数+1
        'app\\video\\behavior\\create_audit_complete_after\\produceMediaComplete', // 触发 视频剪辑（长视频）
    ],
    //评论后
    'add_comment_after'      => [
        'app\\video\\behavior\\add_comment_after\\sendMessage', //视频评论 发送极光消息
    ],

	//评论回复 前
    'add_comment_reply_before'      => [
        'app\\video\\behavior\\add_comment_reply_before\\checkCommentById', // 检测评论是否存在
    ],
    //评论回复 后
    'add_comment_reply_after'      => [
        'app\\video\\behavior\\add_comment_reply_after\\sendMessage', // 发送极光消息
    ],

	//评论点赞 前
    'add_comment_support_before'      => [
        'app\\video\\behavior\\add_comment_support_before\\checkSupport', // 是否点过赞
    ],
    //评论点赞 后
    'add_comment_support_after'      => [
        'app\\video\\behavior\\add_comment_support_after\\sendMessage', // 发送极光消息
    ],
	//评论取消点赞
    'cancel_comment_support_before'      => [
        // 'app\\video\\behavior\\cancel_comment_support_before\\checkSupport', // 是否点过赞
    ],
	//回复点赞 前
    'add_reply_support_before'      => [
        'app\\video\\behavior\\add_reply_support_before\\checkSupport', // 是否点过赞
    ],
    //回复点赞 后
    'add_reply_support_after'      => [
        'app\\video\\behavior\\add_reply_support_after\\sendMessage', // 发送极光消息
    ],
	//评论回复点赞
    'cancel_reply_support_before'      => [
        // 'app\\video\\behavior\\cancel_reply_support_before\\checkSupport', // 是否点过赞
    ],
	//视频举报
    'add_report_before'      => [
        'app\\video\\behavior\\add_report_before\\checkReport', // 是否点过赞
    ],
	//视频收藏
    'add_collect_before'      => [
        'app\\video\\behavior\\add_collect_before\\checkCollect', // 是否收藏
    ],
	//视频收藏
    'cancel_collect_before'      => [
        'app\\video\\behavior\\cancel_collect_before\\checkCollect', // 是否收藏
    ],
	
	//视频评论删除
    'cancel_comment_before'      => [
        'app\\video\\behavior\\cancel_comment_before\\checkComment', // 删除人身份判断
    ],
	//视频评论回复删除
    'cancel_comment_reply_before'      => [
        'app\\video\\behavior\\cancel_comment_reply_before\\checkReply', // 删除人身份判断
    ],
	
	//视频评论回复删除
    'submit_video_info_before'      => [
		'app\\video\\behavior\\submit_video_info_before\\submitVideoPlayType', 
        'app\\video\\behavior\\submit_video_info_before\\submitVideoPlayStatus', 
    ],
	
	//记录观看时长 后置
    'add_play_watchcount_after'      => [
		'app\\video\\behavior\\add_play_watchcount_after\\followPush',//用户关注的视频，观看记录 
    ],

    /*****************video******************/
	
	
    /*****************erp******************/
	//购物车前置
    'salecar_list_before'      => [
		'app\\erp\\behavior\\salecar\\updateStock',//变更库存
    ],
	//订单列表
	'order_list_before'      => [
		'app\\erp\\behavior\\order_list\\updateStock',//变更库存
    ],
	
	//领取中心
	'order_list_before'      => [
		'app\\erp\\behavior\\order_list\\updateStock',//变更库存
    ],

    //支付成功后（购买商品订单）
    'paySuccessOrder_after'      => [
		'app\\erp\\behavior\\paySuccessOrder_after\\updateStock',//变更库存
    ],
	
	//领取优惠券前置
    'coupon_receive_before'      => [
		'app\\erp\\behavior\\coupon_receive_before\\isReceive',//是否领取
		'app\\erp\\behavior\\coupon_receive_before\\isGetReceive',//是否满足领取条件
		'app\\erp\\behavior\\coupon_receive_before\\isFinished',//是否发完
    ],
    /*****************erp******************/

    //支付成功后 储值成功
    'paySuccessOrderCz_after'      => [
		'app\\user_center\\behavior\\user\\paySuccessOrderCz_after\\BalanceRule',//储值规则
    ],

    //支付订单成功后
	'order_over_after'      => [
		'app\\erp\\behavior\\order_pay\\notice',//发送极光
    ],
];
